import request from '@/utils/request'

// 查询项目信息列表
export function listProjects(query) {
  return request({
    url: '/ndpf/projects/list',
    method: 'get',
    params: query
  })
}

// 查询项目信息详细
export function getProjects(projectId) {
  return request({
    url: '/ndpf/projects/' + projectId,
    method: 'get'
  })
}

// 新增项目信息
export function addProjects(data) {
  return request({
    url: '/ndpf/projects',
    method: 'post',
    data: data
  })
}

// 修改项目信息
export function updateProjects(data) {
  return request({
    url: '/ndpf/projects',
    method: 'put',
    data: data
  })
}

// 删除项目信息
export function delProjects(projectId) {
  return request({
    url: '/ndpf/projects/' + projectId,
    method: 'delete'
  })
}

// 查询用户项目信息列表
export function listUserProjects(query) {
  return request({
    url: '/ndpf/projects/getUserProjectslist',
    method: 'get',
    params: query
  })
}


// 查询项目信息列表
export function listExamineProjects(query) {
  return request({
    url: '/ndpf/projects/examineList',
    method: 'get',
    params: query
  })
}

// 审批项目通过
export function examineProjectPass(projectId) {
  return request({
    url: '/ndpf/projects/examineProjectPass/' + projectId,
    method: 'put'
  })
}

// 审批项目通过
export function examineProjectRefuse(projectId) {
  return request({
    url: '/ndpf/projects/examineProjectRefuse/' + projectId,
    method: 'put'
  })
}


// 查询项目信息列表
export function mangerListProjects(query) {
  return request({
    url: '/ndpf/projects/mangerList',
    method: 'get',
    params: query
  })
}